<template>
  <view class="page-box">
    <text>{{ number }}</text>
    <button @click="clickHandler(number)">
      按钮
    </button>
  </view>
</template>

<script>
export default {
  data() {
    return {
      number: 0,
    };
  },
  methods: {
    clickHandler(number) {
      this.setData({
        number: number++
      })
    }
  },
};
</script>

<style lang="scss">
.page-box {
  height: 100px;

  text {
    color: red;
  }

  button {
    color: blue;
  }
}
</style>